package com.ruoyi.gameRecord.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gameRecord.mapper.MetaverseGameRecordMapper;
import com.ruoyi.gameRecord.domain.MetaverseGameRecord;
import com.ruoyi.gameRecord.service.IMetaverseGameRecordService;

import javax.annotation.Resource;

/**
 * 创建房间Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-18
 */
@Service
public class MetaverseGameRecordServiceImpl implements IMetaverseGameRecordService 
{
    @Resource
    private MetaverseGameRecordMapper metaverseGameRecordMapper;

    /**
     * 查询创建房间
     * 
     * @param gameNum 创建房间主键
     * @return 创建房间
     */
    @Override
    public MetaverseGameRecord selectMetaverseGameRecordByGameNum(Long gameNum)
    {
        return metaverseGameRecordMapper.selectMetaverseGameRecordByGameNum(gameNum);
    }

    /**
     * 查询创建房间列表
     * 
     * @param metaverseGameRecord 创建房间
     * @return 创建房间
     */
    @Override
    public List<MetaverseGameRecord> selectMetaverseGameRecordList(MetaverseGameRecord metaverseGameRecord)
    {
        return metaverseGameRecordMapper.selectMetaverseGameRecordList(metaverseGameRecord);
    }

    /**
     * 新增创建房间
     * 
     * @param metaverseGameRecord 创建房间
     * @return 结果
     */
    @Override
    public int insertMetaverseGameRecord(MetaverseGameRecord metaverseGameRecord)
    {
        metaverseGameRecord.setCreateTime(DateUtils.getNowDate());
        metaverseGameRecord.setStatus("1");
        return metaverseGameRecordMapper.insertMetaverseGameRecord(metaverseGameRecord);
    }

    /**
     * 修改创建房间
     * 
     * @param metaverseGameRecord 创建房间
     * @return 结果
     */
    @Override
    public int updateMetaverseGameRecord(MetaverseGameRecord metaverseGameRecord)
    {
        metaverseGameRecord.setUpdateTime(DateUtils.getNowDate());
        return metaverseGameRecordMapper.updateMetaverseGameRecord(metaverseGameRecord);
    }

    /**
     * 批量删除创建房间
     * 
     * @param gameNums 需要删除的创建房间主键
     * @return 结果
     */
    @Override
    public int deleteMetaverseGameRecordByGameNums(Long[] gameNums)
    {
        return metaverseGameRecordMapper.deleteMetaverseGameRecordByGameNums(gameNums);
    }

    /**
     * 删除创建房间信息
     * 
     * @param gameNum 创建房间主键
     * @return 结果
     */
    @Override
    public int deleteMetaverseGameRecordByGameNum(Long gameNum)
    {
        return metaverseGameRecordMapper.deleteMetaverseGameRecordByGameNum(gameNum);
    }

    @Override
    public int updateStatus(Long gameNum) {
        return metaverseGameRecordMapper.updateStatus(gameNum);
    }

    @Override
    public List<MetaverseGameRecord> selectMetaverseGameRecordListAop(Long shopManagerId) {
        return metaverseGameRecordMapper.selectMetaverseGameRecordListAop(shopManagerId);
    }

    @Override
    public List<MetaverseGameRecord> selectMetaverseGameRecordListAbc(List<Long> id) {
        return metaverseGameRecordMapper.selectMetaverseGameRecordListAbc(id);
    }

}
